<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>APP后台运营平台</title>
		<link rel="shortcut icon" href="favicon.ico">
		<link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
		<link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
		<link href="css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
		<link href="css/animate.css" rel="stylesheet">
		<link href="css/style.css?v=4.1.0" rel="stylesheet">
	</head>
	<body class="gray-bg top-navigation">
		<div id="wrapper">
			<div id="page-wrapper" class="gray-bg">
				<div class="row border-bottom white-bg">
					<nav class="navbar navbar-static-top" role="navigation">
						<div class="navbar-header">
							<button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
                            <i class="fa fa-reorder"></i>
                        	</button>
							<a href="index.html" class="navbar-brand"><img style="display: inline;" src="img/logo.png" alt="" width="120px" /><span style="font-size: 20px;">百知在线课程运营平台</span></a>
						</div>
						<div class="navbar-collapse collapse" id="navbar">
							<ul class="nav navbar-nav">
								<li class="active">
									<a aria-expanded="false" role="button" href="index.html">刷新<i class="fa fa-refresh"></i> </a>
								</li>
								<li class="dropdown">
									<a aria-expanded="false" role="button" href="#" class="dropdown-toggle" data-toggle="dropdown"> 用户管理 <span class="caret"></span></a>
									<ul role="menu" class="dropdown-menu">
										<li>
											<!--<a href="back/user/UserList.html">用户信息</a>-->
											<a href="#" onclick="showUser()">用户信息</a>
										</li>
										<li>
											<a href="#" onclick="showUserCharts()">统计分析</a>
										</li>
									</ul>
								</li>
								<li class="dropdown">
									<a aria-expanded="false" role="button" href="#" class="dropdown-toggle" data-toggle="dropdown"> 课程管理 <span class="caret"></span></a>
									<ul role="menu" class="dropdown-menu">
										<li>
											<a href="#" onclick="showCoursesCharts()">统计分析</a>
										</li>
										<li>
											<a href="">菜单列表</a>
										</li>
									</ul>
								</li>
								<li class="dropdown">
									<a aria-expanded="false" role="button" href="#" class="dropdown-toggle" data-toggle="dropdown"> 支付管理 <span class="caret"></span></a>
									<ul role="menu" class="dropdown-menu">
										<li>
											<a href="">菜单列表</a>
										</li>
										<li>
											<a href="">菜单列表</a>
										</li>
									</ul>
								</li>
								<li class="dropdown">
									<a aria-expanded="false" role="button" href="#" class="dropdown-toggle" data-toggle="dropdown"> 日志管理 <span class="caret"></span></a>
									<ul role="menu" class="dropdown-menu">
										<li>
											<a href="">菜单列表</a>
										</li>
										<li>
											<a href="">菜单列表</a>
										</li>
										<li>
											<a href="">菜单列表</a>
										</li>
										<li>
											<a href="">菜单列表</a>
										</li>
									</ul>
								</li>

							</ul>
							<ul class="nav navbar-top-links navbar-right">
								<li>
									<a href="login.html">
										<i class="fa fa-sign-out"></i> 退出
									</a>
								</li>
							</ul>
						</div>
					</nav>
				</div>
				<div id='main' class="wrapper wrapper-content">
					<div class="container">
						<div class="row">
							<!--第二行-->

							<div class="col-md-4">
								<div class="widget style1 navy-bg">
									<div class="row vertical-align">
										<div class="col-xs-3">
											<i class="fa fa-user fa-3x"></i>
										</div>
										<div class="col-xs-9 text-right">
											<span>用户访问量</span>
											<h2 class="font-bold" id="userVisits"></h2>
										</div>
									</div>
								</div>
							</div>
							<div class="col-md-4">
								<div class="widget style1 navy-bg">
									<div class="row vertical-align">
										<div class="col-xs-3">
											<i class="fa fa-video-camera fa-3x"></i>
										</div>

										<div class="col-xs-9 text-right">
											<span>视频播放量</span>
											<h2 class="font-bold" id="videoPlayback"></h2>
										</div>
									</div>
								</div>
							</div>
							<div class="col-md-4">
								<div class="widget style1 navy-bg">
									<div class="row vertical-align">
										<div class="col-xs-3">
											<i class="fa fa-cny fa-3x"></i>
										</div>
										<div class="col-xs-9 text-right">
											<span>视频购买量</span>
											<h2 class="font-bold" id="videoPurchaseVolume"></h2>
										</div>
									</div>
								</div>
							</div>
							<div class="col-md-3">
								<div class="ibox float-e-margins">
									<div class="ibox-title">
										<span class="label label-danger pull-right">总</span>
										<h5>用户量</h5>
									</div>
									<div class="ibox-content">
										<h1 class="no-margins" id="userTotal"></h1>
										<div class="stat-percent font-bold text-success">98% <i class="fa fa-bolt"></i>
										</div>
										<small>完成度</small>
									</div>
								</div>
							</div>
							<div class="col-md-3">
								<div class="ibox float-e-margins">
									<div class="ibox-title">
										<span class="label label-danger pull-right">总</span>
										<h5>课程量</h5>
									</div>
									<div class="ibox-content">
										<h1 class="no-margins" id="courseTotal"></h1>
										<div class="stat-percent font-bold text-success">90% <i class="fa fa-bolt"></i>
										</div>
										<small>完成度</small>
									</div>
								</div>
							</div>
							<div class="col-md-3">
								<div class="ibox float-e-margins">
									<div class="ibox-title">
										<span class="label label-danger pull-right">总</span>
										<h5>视频量</h5>
									</div>
									<div class="ibox-content">
										<h1 class="no-margins" id="videoTotal"></h1>
										<div class="stat-percent font-bold text-success">98% <i class="fa fa-bolt"></i>
										</div>
										<small>完成度</small>
									</div>
								</div>
							</div>
							<div class="col-md-3">
								<div class="ibox float-e-margins">
									<div class="ibox-title">
										<span class="label label-danger pull-right">总</span>
										<h5>合作企业数量</h5>
									</div>
									<div class="ibox-content">
										<h1 class="no-margins" id="jointCompanyTotal"></h1>
										<div class="stat-percent font-bold text-success">60% <i class="fa fa-bolt"></i>
										</div>
										<small>完成度</small>
									</div>
								</div>
							</div>

						</div>
						<div class="row">
							<div class="col-lg-12">
								<div class="ibox float-e-margins">
									<div class="ibox-content">
										<div class="m-t-sm">
											<div class="row">
												<!--地图展示-->
												<div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>合作企业分布(学员就业城市分布)</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
                                <i class="fa fa-wrench"></i>
                            </a>
                            <ul class="dropdown-menu dropdown-user">
                                <li><a href="graph_flot.html#">选项1</a>
                                </li>
                                <li><a href="graph_flot.html#">选项2</a>
                                </li>
                            </ul>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div style="height:400px" id="echarts-map-chart"></div>
                    </div>
                </div>
            </div>
											</div>
										</div>

										<div class="m-t-md">
											<small class="pull-right">
                                        <i class="fa fa-clock-o"> </i>
                                        2018年9月10日更新
                                    </small>
										</div>
									</div>
								</div>
							</div>

						</div>
					</div>
				</div>
				<div class="footer navbar-fixed-bottom">
					<div class="pull-right">
						By：
						<a href="http://www.baizhiedu.com" target="_blank">百知教育·JAVA技术部</a>
					</div>
					<div>
						<strong>Copyright</strong> 百知教育 &copy; 2018
					</div>
				</div>
			</div>
		</div>

		<!-- 全局js -->
		<script src="js/jquery.min.js?v=2.1.4"></script>
		<script src="js/bootstrap.min.js?v=3.3.6"></script>

		<!-- 自定义js -->
		<script src="js/content.js?v=1.0.0"></script>

		<!-- Bootstrap table -->
		<script src="js/plugins/bootstrap-table/bootstrap-table.js"></script>
		<script src="js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
		<!-- ECharts -->
		
		<!--<script src="js/plugins/echarts/echarts-all.js"></script>-->
		<script src="js/plugins/echarts/echarts.min.js"></script><br />
		<script src="js/plugins/echarts/china.js"></script><br />
		<script>
            $(function() {
//                请求首页需要加载的数据
                $.ajax({
                    type : 'get',
                    url : "/bzas/index/getIndexData",
                    dataType : 'json',
                    success : function(data) {
//						数据加载
//                        用户访问量 userVisits
                        if(data.userVisits != null){
                            $("#userVisits").html(data.userVisits)
                        }
//                        视频播放量 videoPlayback
                        if(data.videoPlayback != null){
                            $("#videoPlayback").html(data.videoPlayback)
                        }
//                        视频购买量 videoPurchaseVolume
                        if(data.videoPurchaseVolume != null){
                            $("#videoPurchaseVolume").html(data.videoPurchaseVolume)
                        }
//                        用户量 userTotal
                        if(data.userTotal != null){
                            $("#userTotal").html(data.userTotal)
                        }
//                        课程量 courseTotal
                        if(data.courseTotal != null){
                            $("#courseTotal").html(data.courseTotal)
                        }
//                        视频量 videoTotal
                        if(data.videoTotal != null){
                            $("#videoTotal").html(data.videoTotal)
                        }
//                        合作企业数量 jointCompanyTotal
                        if(data.jointCompanyTotal != null){
                            $("#jointCompanyTotal").html(data.jointCompanyTotal)
                        }
					}
				})
			});

			function showUser() {
				$('#main').load("back/user/UserList.html");
			}

			function showCoursesCharts() {
				$('#main').load("back/user/UserCharts.html");
			}
			
			
			/**
			 * 初始化就业学员分布
			 */
			var mapChart = echarts.init(document.getElementById("echarts-map-chart"));
    		var mapoption = {
		        title : {
		            text: '就业学员分布',
		            subtext: '截止2018年10月',
		            x:'center'
		        },
		        tooltip : {
		            trigger: 'item'
		        },
		        legend: {
		            orient: 'vertical',
		            x:'left',
		            data:['学员就业','合作企业']
		        },
		        dataRange: {
		            min: 0,
		            max: 2500,
		            x: 'left',
		            y: 'bottom',
		            text:['高','低'],           // 文本，默认为数值文本
		            calculable : true
		        },
		        roamController: {
		            show: true,
		            x: 'right',
		            mapTypeControl: {
		                'china': true
		            }
		        },
		        series : [
		            {
		                name: '学员就业',
		                type: 'map',
		                mapType: 'china',
		                roam: false,
		                itemStyle:{
		                    normal:{label:{show:true}},
		                    emphasis:{label:{show:true}}
		                },
		                data:[
		                    {name: '北京',value: Math.round(Math.random()*1000)},
		                    {name: '天津',value: Math.round(Math.random()*1000)},
		                    {name: '上海',value: Math.round(Math.random()*1000)},
		                    {name: '重庆',value: Math.round(Math.random()*1000)},
		                    {name: '河北',value: Math.round(Math.random()*1000)},
		                    {name: '河南',value: Math.round(Math.random()*1000)},
		                    {name: '云南',value: Math.round(Math.random()*1000)},
		                    {name: '辽宁',value: Math.round(Math.random()*1000)},
		                    {name: '黑龙江',value: Math.round(Math.random()*1000)},
		                    {name: '湖南',value: Math.round(Math.random()*1000)},
		                    {name: '安徽',value: Math.round(Math.random()*1000)},
		                    {name: '山东',value: Math.round(Math.random()*1000)},
		                    {name: '新疆',value: Math.round(Math.random()*1000)},
		                    {name: '江苏',value: Math.round(Math.random()*1000)},
		                    {name: '浙江',value: Math.round(Math.random()*1000)},
		                    {name: '江西',value: Math.round(Math.random()*1000)},
		                    {name: '湖北',value: Math.round(Math.random()*1000)},
		                    {name: '广西',value: Math.round(Math.random()*1000)},
		                    {name: '甘肃',value: Math.round(Math.random()*1000)},
		                    {name: '山西',value: Math.round(Math.random()*1000)},
		                    {name: '内蒙古',value: Math.round(Math.random()*1000)},
		                    {name: '陕西',value: Math.round(Math.random()*1000)},
		                    {name: '吉林',value: Math.round(Math.random()*1000)},
		                    {name: '福建',value: Math.round(Math.random()*1000)},
		                    {name: '贵州',value: Math.round(Math.random()*1000)},
		                    {name: '广东',value: Math.round(Math.random()*1000)},
		                    {name: '青海',value: Math.round(Math.random()*1000)},
		                    {name: '西藏',value: Math.round(Math.random()*1000)},
		                    {name: '四川',value: Math.round(Math.random()*1000)},
		                    {name: '宁夏',value: Math.round(Math.random()*1000)},
		                    {name: '海南',value: Math.round(Math.random()*1000)},
		                    {name: '台湾',value: Math.round(Math.random()*1000)},
		                    {name: '香港',value: Math.round(Math.random()*1000)},
		                    {name: '澳门',value: Math.round(Math.random()*1000)}
		                ]
		            },
		            {
		                name: '合作企业',
		                type: 'map',
		                mapType: 'china',
		                itemStyle:{
		                    normal:{label:{show:true}},
		                    emphasis:{label:{show:true}}
		                },
		                data:[
		                    {name: '北京',value: Math.round(Math.random()*1000)},
		                    {name: '天津',value: Math.round(Math.random()*1000)},
		                    {name: '上海',value: Math.round(Math.random()*1000)},
		                    {name: '重庆',value: Math.round(Math.random()*1000)},
		                    {name: '河北',value: Math.round(Math.random()*1000)},
		                    {name: '安徽',value: Math.round(Math.random()*1000)},
		                    {name: '新疆',value: Math.round(Math.random()*1000)},
		                    {name: '浙江',value: Math.round(Math.random()*1000)},
		                    {name: '江西',value: Math.round(Math.random()*1000)},
		                    {name: '山西',value: Math.round(Math.random()*1000)},
		                    {name: '内蒙古',value: Math.round(Math.random()*1000)},
		                    {name: '吉林',value: Math.round(Math.random()*1000)},
		                    {name: '福建',value: Math.round(Math.random()*1000)},
		                    {name: '广东',value: Math.round(Math.random()*1000)},
		                    {name: '西藏',value: Math.round(Math.random()*1000)},
		                    {name: '四川',value: Math.round(Math.random()*1000)},
		                    {name: '宁夏',value: Math.round(Math.random()*1000)},
		                    {name: '香港',value: Math.round(Math.random()*1000)},
		                    {name: '澳门',value: Math.round(Math.random()*1000)}
		                ]
		            }
		        ]
		    };
    		mapChart.setOption(mapoption);
    		$(window).resize(mapChart.resize);
		</script>

	</body>

</html>